#ifndef SQ_LIST_H__
#define SQ_LIST_H__

#define ElemType int
#define List SQList
#define MAXSIZE 100

// typedef int ElemType;

/**
 * @brief 顺序表
 */
typedef struct SqList
{
    ElemType * datas;        // 存储
    int size;
    int length;
} SQList;

void initSqList(SQList * L);
void destroySqList(SQList * L);
void clearSqList(SQList *L);
int sqListEmpty(SQList *L);
int sqListLength(SQList *L);
int getSqListElem(SQList *L, int i, ElemType *e);
int locateSqListElem(SQList *L, ElemType e);
int priorSqListElem(SQList *L, ElemType cur_e, ElemType *pre_e);
int nextSqListElem(SQList *L, ElemType cur_e, ElemType *next_e);
int insertSqList(SQList *L, int i, ElemType e);
int deleteSqList(SQList *L, int i, ElemType *e);
void traverseSqList(SQList *L);

#endif